package com.itheima.controller;


import com.itheima.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @PostMapping
    public Boolean save(User user){
        System.out.println("save..."+user);
        return true;
    }


    @DeleteMapping("/{uuid}")
    public Boolean update(@PathVariable Integer uuid){
        System.out.println("update..."+uuid);
        return true;
    }

    @GetMapping ("/{uuid}")
    public User get(@PathVariable Integer uuid){
        System.out.println("get..."+uuid);
        return null;
    }
    @GetMapping ("/{page}/{size}")
    public List getAll(@PathVariable Integer page,@PathVariable Integer size){
        System.out.println("get..."+page+"."+size);
        return null;
    }

    @PostMapping("/login")
    public User login(String userName,String password){
        System.out.println("login..."+userName+","+password);
    return null;
    }

}
